package teamGiga.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import teamGiga.dao.MovieDao;
import action.servlet.ActionForWard;

public class QnaDeleteAction extends Action{
	private String path;
	private boolean redirect;
	
	public QnaDeleteAction() {
		super();
	}

	public QnaDeleteAction(String path, boolean redirect) {
		super();
		this.path = path;
		this.redirect = redirect;
	}

	@Override
	public ActionForWard execute(HttpServletRequest request,
			HttpServletResponse response) {
		// TODO Auto-generated method stub
		int no = Integer.parseInt(request.getParameter("no"));
		try {
			MovieDao.qnaDelete(no);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		
		
		return new ActionForWard(path, redirect);
	}
	
}
